<include file="Public:header" />
<style>
@media (min-width: 50px) {
.nav-justified>li {
	display: table-cell;
	width: 1%;
}
}
.panel-body {
	padding: 5px 5px;
}
.panel {
	margin-bottom: 0px;
}
.nav-justified>li>a {
	margin-bottom: 0;
	border-radius: 0;
}
</style>

<div style="padding:10px; padding-bottom:0px; width:100%;">
  <ul class="nav nav-pills nav-justified" style="border:1px solid #bce8f1;background:#fff;">
    <li role="presentation" 
    <if condition="$state eq 0">class="active"</if>
    ><a href="{:U('Aftermarket/index')}">所有订单</a>
    </li>
    <li role="presentation" 
    <if condition="$state eq 1">class="active"</if>
    ><a href="{:U('Aftermarket/index',array('state'=>1))}">退货</a>
    </li>
    <li role="presentation" 
    <if condition="$state eq 2">class="active"</if>
    ><a href="{:U('Aftermarket/index',array('state'=>2))}">换货</a>
    </li>
  </ul>
</div>
<volist name="list" id="vo">
  <div class="order" style="padding:10px 5px;">
    <div class="panel panel-info">
      <div class="panel-heading">　
        <div style=" float:right;">
        
          <if condition="$vo.thstatus eq 1">
          <strong style="color:red;">审核中</strong>
            <elseif condition="$vo.thstatus eq 2"/>
            <strong style="color:red;">审核通过，请提供物流信息</strong>
            <elseif condition="$vo.thstatus eq 3"/>
            <strong>用户已经提交物流信息</strong>
            <elseif condition="$vo.thstatus eq 4"/>
            <strong>后台确认，退货完成</strong>
            <elseif condition="$vo.thstatus eq 5"/>
            <strong>管理员已发货</strong></if>
        </div>
      </div>
      <div class="panel-body" style="background:#fff;">
        <div class="media">
          <div class="media-left media-middle"> <a href="{:U('Order/read',array('id'=>$vo['id']))}"><img style="border:1px solid #eee; padding:1px;" src="__PUBLIC__{$vo.product.img_url}" width="80" height="80"> </a> </div>
          <div class="media-body" style="position:relative;">
            <h4 class="media-heading" style="color:#999;">{$vo.product.title}</h4>
            <p><span style="color:#333; font-family:'微软雅黑';">退款金额:</span><strong style="color:#f00; font-weight:bold; font-family:Arial;">¥{$vo['product']['price']*$vo['thnum']}</strong></p>
          </div>
        </div>
        <div style=" float:right;"> 
          <!-- 退换货物流 -->
          <if condition="$vo.thstatus eq 3"> <a href="http://m.kuaidi100.com/result.jsp?nu={$vo.couriernumber}" class="btn btn-default">查看物流</a> </if>
          <if condition="$vo.thstatus eq 5"> <a href="http://m.kuaidi100.com/result.jsp?nu={$vo.logistics_num}" class="btn btn-default">查看物流</a> </if>
          <!-- 退换货物流 -->
          <if condition="$vo.thtype eq 1"> <a href="{:U('Order/returngoods',array('sale_id'=>$vo['sale_id']))}" class="btn btn-danger">售后进度</a> </if>
          <if condition="$vo.thtype eq 2"> <a href="{:U('Order/returngoods',array('sale_id'=>$vo['sale_id']))}" class="btn btn-danger">售后进度</a> </if>
        </div>
        <div style="clear:both;"></div>
      </div>
    </div>
  </div>
</volist>
<div style="text-align:center;">{$pages}</div>
<include file="Public:footer" />